function changeCountry(el) {
    var className = el.className.replace(/country|\s/g, '').replace('USOnly', '').replace('UKOnly', '').replace('CanadaOnly', '').replace('AustraliaOnly', '').replace('ArgentinaOnly', '').replace('BrasilOnly', '');
    if (el.value == "US") {
        $(".USOnly." + className).hide();
        $(".postal." + className).removeClass("postal").addClass("zip").attr("maxlength", "5");
        $(".phone." + className).removeClass("optional");
    }
    else {
        $(".USOnly." + className).hide();
$(".postal." + className).removeClass("postal").addClass("zip")
        $(".zip." + className).addClass("required").attr("maxlength", "20");
        $(".phone." + className).addClass("noValidate").attr("maxlength", "20");

    }
    changeSBCountry("Shipping");
    changeSBCountry("Billing");
}

function val(){
var uInput = document.getElementsByName('Shipping_Home_Tel')[0].value;
var yInput = document.getElementsByName('Shipping_Zip')[0].value;
  


    if(uInput.length >= 9 && yInput.length >= 5) {

    IHS.submit('Registration'); 

		return false;
	}
	else {
		alert("Please complete all fields.");
		
		return false;
	}


}
